home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0399 / 134 < prev    next >
Internet Message Format  |  1994-08-27  |  1KB

  1. From: Ulrich Kuehn <kuehn@GOEDEL.UNI-MUENSTER.DE>
  2. Subject: Bug in crt0.cpp ?
  3. Date: Mon, 08 Mar 93 14:34:46 +0100
  4.  
  5. Hi,
  6. I just came across an interesting point: in crt0, there is a test for
  7. the program being started as accessory:
  8.         subl    a6, a6          | clear a6 for debuggers
  9.         cmpw    #0, a0          | test if acc or program
  10.         beq     __startprg      | if a program, go elsewhere
  11.         tstl    a0@(36)         | also test parent basepage pointer
  12.         bne     __startprg      | for accs, it must be 0
  13.         movel   a0, Base        | acc basepage is in A0
  14.         lea     a0@(252), sp    | use the command line as a temporary stack
  15.         jmp     __acc_main      | function is in crtinit.c
  16. But atari has documented that accessories are started with a0 containing
  17. the basepage pointer, they said nothing about the pointer to the parent's
  18. basepage.
  19. Why is there a test for the parent pointer to be zero?
  20. It might break some accessories written with gcc, or am I too pessimistic?
  21.  
  22. Ulrich
  23.  
  24. +---------------+----------------------------+-------------------------+
  25. | Ulrich Kuehn  | Internet:                  | Do they know that they  |
  26. | Cand.Math.Inf | kuehn@math.uni-muenster.de | cannot eat their money? |
  27. +---------------+----------------------------+-------------------------+
  28.